import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import ElementPlus from "element-plus";
// element plus 组件样式
import "element-plus/dist/index.css";
import request from "./utils/request";
import storage from "./utils/storage";
import api from "./api";

// vuex
import store from "./store";

const app = createApp(App);
// 注册路由
app.use(router);
app.use(ElementPlus);
app.use(store);

// 全局挂载 request 用 this.$request 调用, storage 同理
app.config.globalProperties.$request = request;
app.config.globalProperties.$storage = storage;
app.config.globalProperties.$api = api;

app.mount("#app");
